﻿using BusinessEntity.Schedule;
using ce.autofac.extension;
using learun.util;
using Quartz;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BusinessRule.Scheduling
{
    public class SchedulingOtherJobHelper : IJob
    {
        //private readonly TSSchemeIBLL tSSchemeIBLL;
        //private readonly TSLogIBLL tSLogIBLL;
        /// <summary>
        /// 
        /// </summary>
        public SchedulingOtherJobHelper()
        {
            //tSSchemeIBLL = IocManager.Instance.GetService<TSSchemeIBLL>();
            //tSLogIBLL = IocManager.Instance.GetService<TSLogIBLL>();
        }

        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                await Task.Factory.StartNew(() =>
                {

                    JobDataMap dataMap = context.JobDetail.JobDataMap;
                    string keyValue = dataMap.GetString("keyValue");

                });
            }
            catch (Exception)
            {

            }
        }

        /// <summary>
        /// 任务执行方法
        /// </summary>
        /// <param name="keyValue">任务进程主键</param>
        /// <returns></returns>
        private async Task<bool> _Execute(string keyValue)
        {
            bool isOk = true;
            try
            {

            }
            catch (Exception)
            {

                throw;
            }

            return isOk;
        }
    }
}
